﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.Finance
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.Finance;

    public class map_JJBForProject : EntityMapping<JJBForProject>
    {
        public map_JJBForProject()
        {
            Property(x => x.Describe, map =>
            {
                map.Length(100000);
            });

            Property(x => x.Flag, map =>
            {
            });

            //对应项目关系（多对多）
            Bag(x => x.Projects, map =>
            {
                map.Table("ref_JJB_Projects");
                map.Key(keyMapper => keyMapper.Column("JJBId"));
            }, act => act.ManyToMany(m => m.Column("ProjId")));
        }
    }
}
